#include "MainWindowSDL_1_3.h"
#include "SystemSDL_1_3.h"

#include <SDL.h>

CMainWindowSDL_1_3::CMainWindowSDL_1_3( void )
{
    //ctor
}

CMainWindowSDL_1_3::~CMainWindowSDL_1_3( void )
{
    //dtor
}


void CMainWindowSDL_1_3::Process( const SDL_Event& ev )
{
    CSystemSDL_1_3_Helper::PrintEvent( ev );
    switch( ev.type )
    {
    case SDL_WINDOWEVENT:
        {
            switch( ev.window.type )
            {
            case SDL_WINDOWEVENT_CLOSE:
                {
                    ShutDown();
                    break;
                }
            default: break;
            }

            break;
        }
    case SDL_KEYUP:
        {
            if( ev.key.keysym.sym == SDLK_ESCAPE )
            {
                ShutDown();
            }
            break;
        }
    default: break;
    }
}
